node = current_node
upstream "xaf_jetty_at_#{node.name}" do
  server node.ip, 8082
end
location "/xaf_om/", "xaf_jetty_at_#{node.name}", :alias => "om"
location "/xaf_mo/", "xaf_jetty_at_#{node.name}", :alias => "mo"
location "/xaf_alarm/", "xaf_jetty_at_#{node.name}", :alias => "alarm"
location "/policy/", "xaf_jetty_at_#{node.name}", :alias => "policy"

location "/api/v1/mo/", "xaf_jetty_at_#{node.name}", :alias => "api/v1/mo/"
location "/api/v1/record/", "xaf_jetty_at_#{node.name}", :alias => "api/v1/record/"
location "/api/v1/alarm/", "xaf_jetty_at_#{node.name}", :alias => "api/v1/alarm/"
location "/api/v1/category", "xaf_jetty_at_#{node.name}", :alias => "api/v1/category"
location "/api/v1/engines", "xaf_jetty_at_#{node.name}", :alias => "api/v1/engines"
location "/api/v1/moc", "xaf_jetty_at_#{node.name}", :alias => "api/v1/moc"
location "/api/v1/notification/", "xaf_jetty_at_#{node.name}", :alias => "/api/v1/notification/"
location "/api/v1/policy/", "xaf_jetty_at_#{node.name}", :alias => "/api/v1/policy/"
location "/api/v1/auth/", "xaf_jetty_at_#{node.name}", :alias => "/api/v1/auth/"
